#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "ui_MainWindow.h"
#include "triangle.h"

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget* parent = 0);

    void putPixel(const QPoint& point, const QColor& color = Qt::black);
    void drawLine(const QPoint& point1, const QPoint& point2, const QColor& color = Qt::black);
    void drawTriangle(const Triangle &triangle);
    void readFile(QString path);
    void render();

    QSize sizePaint;
    QColor **grid;
    QVector<Triangle> triangles;
    QColor selectedColor;
    bool wireframe, tracejado, ambos;
    QString filePath;

public slots:
    void startRender();
    void wireframeOption(bool);
    void tracejadoOption(bool);
    void selectFile();
    void changeZoom(int);
    void ambosOption(bool);

private slots:

private:
    Ui::MainWindow ui;

    QImage buffer;
    int pixelZoom;
};

#endif // MAINWINDOW_H
